#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""

#Author:    LJ
#Email:     admin@attacker.club

#Date:      18-3-27
#Description:

"""


import subprocess

# 使用shell获取信息
def Shell(cmd):
    #
    p = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True)
    results = p.communicate()[0]
    return results.decode()
def SheelCall(cmd):
    p = subprocess.call(cmd)
    return p

if __name__ == "__main__":
    print( Shell ('ifconfig'))
    #

    #print("Exit code",SheelCall(['nslookup', 'baidu.com1']))
    #
